﻿using OAS.Application.AuthApp.Services;
using OAS.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OAS.Application.AuthApp.Services
{
    public class AuthService : Repository<Auth>, IAuthService, ITransient
    {
        public async Task<List<Auth>> GetAuthList()
        {
            return await base.AsQueryable().ToListAsync();
        }
        public async Task UpdateAuth(List<Auth> auths)
        {
            await base.AsDeleteable().Where(o => o.Department_Id == auths.FirstOrDefault().Department_Id).ExecuteCommandAsync();
            await base.AsInsertable(auths).ExecuteCommandAsync();
        }
    }
}
